The present invention relates to a computer system comprising a microcomputer which incorporates a rewritable non-volatile memory storing a power supply control program therein and a method of rewriting the programs of the above-mentioned system.
The present application is based on Japanese Patent application No. 10-172983, filed on Jun. 19, 1998, the contents of which are incorporated herein for reference.
Recently, various types of personal computers known as desktop type, notebook type, etc. are developed. The control of the power supply in the system of each of these personal computers such as, for example, the connection of a notebook personal computer and a docking station for expanding the function of the personal computers is, for the most part, taken care of by a power supply control microcomputer constituted in the form of one chip in which a ROM (read only memory) storing a power supply control program therein is incorporated.
Most recently, as an EEPROM (electrically erasable and programmable ROM) known as a flash memory in which the stored data can be rewritten with a block as a unit have come to be lowered in price, the application of this EEPROM to various microcomputers has come be examined. In this connection, it is considered to apply the EEPROM also to a power supply control microcomputer. If the EEPROM is applied, then merits such as the following merit can be obtained. That is, even in case, after the EEPROM is mounted on a printed circuit board of the microcomputer, the contents (program) thereof are destroyed or even in case, as the structure of the system is changed, the contents thereof are to be put to version-up, it is ensured that, only by rewriting the data of the EEPROM, the purpose can be achieved without replacing the microcomputer itself.
By the way, in a case such as the case where a bug exists in the program of the EEPROM or the case where the program is upgraded, the EEPROM needs to be rewritten. This rewrite processing is executed by starting the rewrite program stored in, for example, a BIOS-ROM or the rewrite program loaded in the system memory through a floppy disk or an internet, etc. from outside. Therefore, unless this rewrite program is in an operable state, the rewrite processing cannot be executed. Therefore, in case some trouble or other exists in the power supply control program stored in the EEPROM incorporated in the power supply control microcomputer, so that the power supply control in the system cannot be effected correctly, and thus, the power supply of the system is not turned on, it is not possible to operate the write program. After all, the power supply control microcomputer itself must be replaced, this being a drawback.
Accordingly, it is an object of the present invention to provide a computer system in which a power supply control program is stored in an EEPROM, wherein the rewrite of the EEPROM can be executed even in case a part of the power supply control program is destroyed, as a result of which an appropriate power supply control cannot be effected, and thus, the rewrite program cannot be started.
A related object of the present invention is to provide a method of rewriting the above EEPROM.
According to the present invention, there is provided a computer system comprising an EEPROM including a first memory region which stores a power supply control program for executing the power supply control of the computer system, and a second memory region which stores a power turn-on program for executing the turn-on of power in the system, a key input detection program for detecting a predetermined key input, and a rewrite request program for requesting the system for rewriting the contents of the first memory region; a key input detector for executing the key input detection program when the power supply in the system is turned on or reset; a power supply controller for effecting the power supply control of the system based on the power supply control program and the power turn-on program when a predetermined key input is not detected by the key input detector; and a rewrite circuit for rewriting the contents of the first memory region based on the rewrite request program when the predetermined key input is detected by the key input detector.
In the computer system according to the present invention, the second memory region is not an object to be rewritten, so that the minimum of programs necessary for the rewrite of the EEPROM and stored in the second memory region, such as the power turn-on program for executing the turn-on of power in the system, the key input detection program for detecting whether or not a predetermined key input is present, and a rewrite request program for requesting the system for rewriting the contents of the first memory region, operate without fail. Even in case the power supply control program stored in the first memory region does not correctly operate, it is possible to start the rewrite program. Further, the minimum of programs necessary for the rewrite of the EEPROM can be prevented from being damaged in case, during the rewrite processing, some abnormality or other has taken place.
In the computer system according to the present invention, the key input detection program is first executed in response to the turn-on or reset of power in the system. As a result of the execution of this key input detection program, the absence or presence of a predetermined key input indicating the rewrite of the contents of the first memory region is detected, and, in case no predetermined key input is present, the power supply control program and the power turn-on program are executed, so that the control of power supply in the system is effected. On the other hand, in case a predetermined key input is present, the rewrite request program is executed, whereby the rewrite of the contents of the first memory region is requested to the system.
In this way, by inputting a predetermined key, the rewrite program is forced to be executed, so that, even in the state in which the contents of the first memory region are destroyed and, thus, the control of power supply in the system cannot be correctly carried out or even in the state in which the version-up of the contents of the above-mentioned contents must be made, it becomes possible to execute, on the board, the rewrite of the contents of the first memory region mentioned above.
Further, the computer system according to the present invention comprises an EEPROM including a first memory region which stored a power supply control program for executing the control of power supply in the computer system and a second memory region which stores a power turn-on program for executing the turn-on of power in the system, a memory check program for checking the contents of the first memory region, and a rewrite request program for requesting the system for rewriting the contents of the first memory region; memory check means for determining the truth of the contents of the first memory region based on the memory check program when power is turned on or reset in the system; power supply control means for executing the control of power supply in the system based on the power supply control program and the power turn-on program when the truth of the contents of the first memory region is affirmed by the memory check means; and rewrite means for rewriting the contents of the first memory region based on the rewrite request program when the truth of the contents of the first memory region is denied by the memory check means.
In this way, the memory check program is first executed in response to the turn-on or reset of power in the system. Through the execution of this memory check program, the truth of the contents of the first memory region is determined. In case the truth is affirmed, the power supply control program and the power turn-on program are executed to perform the control of power supply in the system. On the other hand, in case the truth is denied, the rewrite request program is executed, so that the rewrite of the contents of the first memory region is requested to the system.
Therefore, in case the contents of the first memory region are destroyed, the rewrite program is executed before the utilization thereof, so that the runaway of the system is never caused; and thus, the restoration of the contents of the first memory region thereof is quickly executed.
Additional objects and advantages of the present invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the present invention.
The objects and advantages of the present invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.